	<?php
	include("./header.php");
	?>
	
	





		<?php
			$mail = $_POST["mail"];
			
			$mdp = $_POST["mdp"];
			$mdpcrypt = md5($mdp);
			/*
				* Vérification dans la base
				* remplissage de la variable $is_ok
				*/
			include("comysql.php");
			
			

			$verification=mysql_query("SELECT count(*) FROM users WHERE mdp = '$mdpcrypt' AND mail = '$mail'") or die(mysql_error());

			$resultat=mysql_fetch_row($verification);

			if( $resultat[0] == 0)
			{
				$is_ok = false;
			}
			else
			{
				$is_ok = true;
			}
			if ($is_ok) {
			$_SESSION['login'] = $mail;
			echo '<p> Vous êtes connecté !"</p>';
			}
			else
			{
			echo '<p>Mauvaise combinaison Mot de passe/Mail</p>';
			}
			
?>


<?php
	include("./footer.php");
	?>		
					
				

